package com.macro.mall.mapper;

import com.macro.mall.model.CaseStyle;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CaseStyleMapper {
    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(CaseStyle record);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(CaseStyle record);

    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    CaseStyle selectByPrimaryKey(Integer id);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(CaseStyle record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(CaseStyle record);

    int batchInsert(@Param("list") List<CaseStyle> list);

    List<CaseStyle> getCaseStyleList();

    /**
     * 查询风格个数
     * @return
     */
    int findCaseStyleNum();

    /**
     * 分页查询风格list
     * @param skip
     * @param pageSize
     * @return
     */
    List<CaseStyle> findCaseStyleList(@Param("skip") Integer skip , @Param("pageSize") Integer pageSize);

    int findStyleNameNum(@Param("name") String name, @Param("id") Integer id);
}